<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"  href="/styles/general.css"/>
<link rel="stylesheet" type="text/css" href="/styles/main.css"/>
<link rel="stylesheet" type="text/css" href="/styles/validator.css"/>
<link rel="stylesheet" href="/themes/custom-theme/jquery.ui.all.css">
<script src="/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/js/ui/jquery.ui.core.js" type="text/javascript"></script>
<script src="/js/ui/jquery.ui.widget.js" type="text/javascript"></script>
<script src="/js/ui/jquery.ui.tabs.js" type="text/javascript"></script>
<script src="/scripts/kedit/kindeditor-min.js" type="text/javascript"></script>
<script src="/scripts/kedit/lang/zh_CN.js" type="text/javascript"></script>
<script src="/js/formValidator.js" type="text/javascript"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function(){
	$( "#tabs" ).tabs();
	$.formValidator.initConfig({formid:"myform",onerror:function(msg){alert(msg)}});
	{loop $infos $k $info}
	  {if ($info["formtype"]=="textarea"||$info["formtype"]=="text"||$info["formtype"]=="datetime")}
	$("#{$info['field']}").formValidator({onshow:"请输入{$info['name']}",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});{LF}
	  {/if}
	{/loop}
});
</script>
<title></title>
</head>
<body>
<h1>
<span class="action-span"><a href="/mm/index/m/{$m}">管理{$minfo["name"]}</a></span>
<span class="action-span1"> 修改{$minfo["name"]}</span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
  <form action="/mm/modify/m/{$m}/id/{$id}" method="post" name="myform" id="myform" enctype="multipart/form-data">
  <div id="tabs">
	<ul>
		<li><a href="#tabs-1">基本信息</a></li>
		<li><a href="#tabs-2">制备方法</a></li>
		<li><a href="#tabs-5">样品批次</a></li>
		<li><a href="#tabs-3">分析谱图</a></li>
		<li><a href="#tabs-6">生物活性</a></li>
		<li><a href="#tabs-7">参考文献</a></li>
		<li><a href="#tabs-4">相关成果</a></li>
	</ul>
   {loop $infos $k $info}
	  {if ($info["formtype"]=="hidden")}
	  	{form hidden * $info["field"] $info["field"] $info["v"]}
	  {/if}
   {/loop}
  <div id="tabs-1">
  <table width="100%" id="table_form">
	  {loop $infos $k $info}
	  {if ($info["formtype"]!="hidden")}
	  <tr>
        <td class="label">$info["name"]：</td>
        <td>
			{if ($info["formtype"]=="text")}
				{form text * $info["field"] $info["field"] $info["v"]}
			{elseif ($info["formtype"]=="textarea")}
				{form textarea * $info["field"] $info["field"] $info["v"]}
			{elseif ($info["formtype"]=="editor")}
				{form sinaeditor * $info["field"] $info["field"] $info["v"]}
			{elseif ($info["formtype"]=="datetime")}
				{form datetime * $info["field"] $info["field"] $info["v"]}		
			{elseif ($info["formtype"]=="radio")}
				{form radio * $info["field"] $info["field"] $info["v"] * * $info["arr"]}
			{elseif ($info["formtype"]=="select")}
				{form select * $info["field"] $info["field"] $info["v"] * * $info["arr"]}
			{elseif ($info["formtype"]=="checkbox")}
				{form checkbox * $info["field"] $info["field"] $info["v"] * * $info["arr"]}
			{/if}
        </td>
        <td>
        	<div id="{$info['field']}Tip" style="width:250px"></div>
        </td>
      </tr>
      {/if}
      {/loop}
  </table>  
  </div>
  <div id="tabs-2">2</div>
   <div class="button-div">
        <input type="submit" value="&nbsp;确&nbsp;定&nbsp;" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="&nbsp;重&nbsp;置&nbsp;" />
   </div>
  </form>
</div>
{template 'footer.html'}
</body>
</html>
